package com.hh.base.generator.service;

import com.hh.base.common.TableBean;
import com.hh.base.util.StringUtil;

/**
 * Created by liuhanhui on 2017/10/27.
 */
public class DefaultServiceGenerator extends ServiceGenerator {

    public String createService(String template, TableBean tableBean) {
        String name1 = StringUtil.formatArgsName(tableBean.getName());
        String name2 = StringUtil.toUpperCase4Index(name1);
        template = template.replace("{servicename}", name2 + "Service");
        template = template.replace("{modelname}", name2 + "Model");
        template = template.replace("{name1}", name1);
        return template;
    }
}
